{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "pycharm": {
     "is_executing": false
    }
   },
   "outputs": [],
   "source": [
    "'''\n",
    "For SLP visualization.\n",
    "'''\n",
    "from data.SLP_RD import SLP_RD\n",
    "import opt\n",
    "from utils import vis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "initializing SLP: 100%|██████████████████████████████████████████████████████████████| 102/102 [00:08<00:00, 12.34it/s]\n"
     ]
    }
   ],
   "source": [
    "opts = opt.parseArgs()\n",
    "opts = opt.aug_opts(opts)\n",
    "SLP_rd = SLP_RD(opts, phase='test')\n",
    "\n",
    "idx = 0\n",
    "arr, jt, bb =  SLP_rd.get_array_joints(idx_smpl=idx)\n",
    "ptc = SLP_rd.get_ptc(idx=idx)   # all pixel\n",
    "\n",
    "arr_IR2depth = SLP_rd.get_array_A2B(idx=idx, modA='IR', modB='depthRaw')\n",
    "arr_PM2depth = SLP_rd.get_array_A2B(idx=idx, modA='PM', modB='depthRaw')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "# test the plotly  \n",
    "eye = [1.0, -1.25, 0.7]\n",
    "# vis.vis_IR_D_PM(arr, arr_IR2depth, arr_PM2depth, eye=eye, pth='tmp/demo_SLP.png') #for save out \n",
    "vis.vis_IR_D_PM(arr, arr_IR2depth, arr_PM2depth, eye=eye)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  },
  "pycharm": {
   "stem_cell": {
    "cell_type": "raw",
    "source": [],
    "metadata": {
     "collapsed": false
    }
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}